#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPainter>
#include <QPen>
#include <QGridLayout>
#include <QColorDialog>
#include <QFileDialog>

#include "Space2D.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void setSpace2D(Space2D*);

private:
    Ui::MainWindow* ui;
    Space2D* space2D;
    QColorDialog colorDialog;
    QList<QColor*> colors;
    bool filled;
    bool wired;

signals:
    void newVertexMessage(QList<QColor*>);
    void newLineMessage(QList<QColor*>);
    void newTriangleMessage(bool, bool,QList<QColor*>);
    void newQuadrilateralMessage(bool, bool,QList<QColor*>);
    void cleanAllMessage();
    void loadTextureMessage(QString);

private slots:
    void updateColors();
    void on_actionVertice_triggered();
    void on_actionLinha_triggered();
    void on_actionTriangulo_triggered();
    void on_actionQuadril_tero_triggered();
    void on_actionFilled_triggered(bool checked);
    void on_actionWired_triggered(bool checked);
    void on_actionLimpar_Tudo_triggered();
    void on_actionCores_triggered();
    void on_actionTextura_triggered();
};

#endif // MAINWINDOW_H
